<!DOCTYPE html>
<html>
<head>
  <title>seq</title>
</head>
<body>
<script type="text/javascript">
  function seq(...args) {
    return (val) => {
      args.map(func => func(val))
    }
  }

  let ac = seq(
    (val) => console.log('1', val),
    (val) => console.log('2', val),
    (val) => console.log('3', val),
    (val) => console.log('4', val),
  )
  ac(9090)
</script>
</body>
</html>